id,part_no,stock_code,customer_id,site_id,supplier_id,dispatch_from,description,price,stock_out_type,min_stock,max_stock
<?php foreach ($this->data as $data) : ?>
<?php echo "\"{$data['CustProductSite']['id']}\",\"{$data['Product']['part_no']}\",\"{$data['CustProductSite']['stock_code']}\",\"{$customer_id}\",\"{$site_id}\",\"{$supplier_id}\",\"{$data['CustProductSite']['dispatch_from']}\",\"" . str_replace('"', '""', preg_replace("/[\r]/", "", $data['CustProductSite']['text'])) . "\",\"{$data['CustProductSite']['price']}\",\"{$data['CustProductSite']['stock_out_type']}\",\"{$data['CustProductSite']['min_stock']}\",\"{$data['CustProductSite']['max_stock']}\""; ?>

<?php endforeach; ?>